#ifndef WRITER_H
#define WRITER_H

#include <QObject>
#include <QRunnable>
#include "shelf.h"

class Writer : public QObject, public QRunnable
{
    Q_OBJECT
    int interval;
    QVector<size_t> myBooks;
public:
    explicit Writer(int writeInterval = 1, QObject* parent = 0);
    void tryEdit(size_t index);
    void tryWrite();
    void run();
signals:
    void changedBooksCount(int);
    void changePeopleCount(int);
public slots:
    
};

#endif // WRITER_H
